package jmir.adrian.empresa;

public class EmpleatHores extends Empleat{

	private int hores;
	private double preuHora;
	
	public EmpleatHores(String nom, String cognom, String DNI, int hores, double preuHora) {
		super(nom, cognom, DNI);
		this.hores = hores;
		this.preuHora = preuHora;
	}

	public int getHores() {
		return hores;
	}

	public void setHores(int hores) {
		this.hores = hores;
	}

	@Override
	public double calculaSouTotal() {
		return hores * preuHora;
	}

	@Override
	public String toString() {
		return super.toString()+"Hores = "+hores+"\nSueldu = "+calculaSouTotal();
	}
	
	
}
